import * as actions from '../action';

// 对页面prop 数据进行管理
const initialState = {
  applicationInfo: {},
  authInfo: {},
  AuthFinishedStatus: {
    isBindFinished: false,
    isUnBindFinished: true,
  },
};

export default function index(state = initialState, action) {
  switch (action.type) {
    case actions.AUTH_FINISHED_STATUS_CHANGE:
      return { ...state, AuthFinishedStatus: action.data };
    case actions.APPLICATION_INFO_GET:
      return { ...state, applicationInfo: action.data };
    case actions.AUTH_OWN_INFO_GET:
      return { ...state, authInfo: action.data };
    default:
      return state;
  }
}
